using System;

namespace PHSRAG.Insight21.Humans
{
	/// <summary>
	/// Summary description for Constants.
	/// </summary>
	public class Constants
	{
		#region Miscellaneous
		public const int MaxTitleLength = 30;
		public const string IdPrefix = "IdPrefix";
		#endregion

		#region ProtocolProcessType
		public class ProtocolProcessType
		{
			// Domain
			public const string Domain = "PROTOCOLPROCESSTYPE";

			public const string InitialReview = "PPTYPE_IR";
			public const string Amendment = "PPTYPE_AM";
			public const string AdverseEvent = "PPTYPE_AE";
			public const string ContinuingReview = "PPTYPE_CR";
			public const string OtherEvent = "PPTYPE_OE";


		}
		#endregion

		#region ProtocolProcessShortType
		/// <summary>
		/// Used for setting the Name (FormsID) of the Process.
		/// </summary>
		public class ProtocolProcessShortType
		{
			public const string InitialReview = "IR";
			public const string Amendment = "AME";
			public const string AdverseEvent = "AE";
			public const string ContinuingReview = "CR";
			public const string OtherEvent = "OE";			
		}
		#endregion

        #region AnimalProtocolProcessType
        public class AnimalProtocolProcessType
        {
            // Domain
            public const string Domain = "ANIMALPROTOCOLPROCESSTYPE";

            public const string InitialReview = "ANIMALPPTYPE_IR";
            public const string InitialTissueReview = "ANIMALPPTYPE_TS";
            public const string AnnualReview = "ANIMALPPTYPE_AR";
            public const string Deficiency = "ANIMALPPTYPE_DF";
            public const string TriennialReview = "ANIMALPPTYPE_TR";
            public const string Amendment = "ANIMALPPTYPE_AM";
        }
        #endregion

        #region AnimalProtocolProcessShortType
        public class AnimalProtocolProcessShortType
        {
            public const string InitialReview = "IR";
            public const string AnnualReview = "AR";
            public const string Deficiency = "DF";
            public const string TriennialReview = "TR";
            public const string Amendment = "AME";
        }
        #endregion

        #region USStates

        public class States
		{
			public const string Domain = "USStates";
		}

		#endregion

		#region NewProtocolTypes
		public class NewProtocolType
		{
			// domain
			public const string Domain = "PROTOCOLTYPE";

			// order attribute
			public const string OrderAttribute = "Order";
			
			public const string NewApplication = "PROTOCOLTYPE_STD";
			public const string EmergencyApp = "PROTOCOLTYPE_EMERG";
		}

        public class NewAnimalsProtocolType
        {
            // domain
            public const string Domain = "ANIMALSPROTOCOLTYPE";

            // order attribute
            public const string OrderAttribute = "Order";

            public const string NewApplication = "PROTOCOLTYPE_ANIMALS";
            public const string TissueApplication = "PROTOCOLTYPE_ATISSUE";
        }
        
        public class RexProtocolType
		{
			public const string StandardApplication = "Standard";
			public const string EmergencyApplication = "Emergency Sgl Pt";
			public const string DiscardedHumanMatAndMedRec = "Disc Hum Mat and Med Rec";
			public const string DiscardedHumanMat = "Discarded Hum Mat";
			public const string FundingOnly = "Funding Only";
			public const string MedicalRecords = "Med Rec";
			public const string CoordinatingStatCenter = "Coordinating/Statistical Centerc";
			public const string Short = "Short";
			public const string SecondInstSinglePt = "2nd Institution Sgl Pt";
			public const string CompassionateSinglePatient = "Compassionate Sgl Pt";
		}

		/// <summary>
		///  Constants that contain the Rex COntinuing Review status values
		/// </summary>
		public class RexCRStatus
		{
			public const string A1	= "A1 - Not Activated Yet";
			public const string A2	= "A2 - No Enrollment to Date";
			public const string B1	= "B1 - Enrolling Subjects";
			public const string B2	= "B2 - Ongoing";
			public const string C1	= "C1 - Closed Enrollment: Active Tx or F/U Continues";
			public const string C2	= "C2 - Closed Enrollment: Survival F/U Only";
			public const string C3	= "C3 - Closed Enrollment: Data Analysis Only";
			public const string C4	= "C4 - All Data Collected - Analysis Only";
			public const string D	= "D - Study Completed";
			public const string E1	= "E1 - Study Closed Prior to Completion";
			public const string E2	= "E2 - Study Never Activated";
		}

		public class RexIRBStatusType
		{
			public const string InitialReview = "Application";
			public const string AdverseEvent = "Adverse Event";
			public const string Amendment = "Amendment";
			public const string ContinuingReview = "Continuing Review";
			public const string OtherEvent = "Other Events";
			public const string ViolationDeviation = "Violation/Deviation";
		}
		#endregion

		#region ProtocolOverallStatus
		/// <summary>
		/// These constants relate to teh ID's in the 
		/// ProtocolOVerallStatusType table
		/// </summary>		
		public enum ProtocolOverallStatus
		{
			Active = 1,
			Inactive,
			Pending,
			Hold,
			Exempt,
			Submitted,
			Terminated,
			NotHumanResearch,
			HoldLapsed,
			WorkInProgress
		}
		#endregion

		/// <summary>
		///  the real value of the Protocol's OverallStatus settings (ex. "Active")
		/// </summary>
		public class ProtocolOverallStatusText
		{
			public const string Active = "Active";
			public const string Inactive = "Inactive";
			public const string Pending = "Pending";
			public const string Hold = "Hold";
			public const string Exempt = "Exempt";
			public const string Submitted = "Submitted";
			public const string Terminated = "Terminated";
			public const string NotHumanResearch = "Not Human Research";
			public const string HoldLapsed = "Hold, Lapsed";
			public const string WorkInProgress = "In Progress";
		}

		#region ProtocolProcessStatus
		public class ProtocolProcessStatus
		{
			public const string Domain = "PPSTATUS";

			public const string WorkInProgress ="PPSTATUS_WIP";
			public const string Pending ="PPSTATUS_PEND";
			public const string Submitted="PPSTATUS_SUBMT";
			public const string Merged = "PPSTATUS_MERGED";
			public const string Approved = "PPSTATUS_APPROVED";
			public const string ApprovedInitialApp = "PPSTATUS_IRAPPROVED";
		}
		#endregion

		#region ContinuingReviewShortStudyType
		public class ContinuingReviewShortStudyType
		{
			public const string InterventionInteraction = "InterventionInteraction";
			public const string	ExcessHumanMaterial = "ExcessMaterial";
			public const string	SecondaryUse = "SecondaryUse";
			public const string	MedicalRecords = "MedicalRecords";
			public const string	RPDR = "RPDR";
			public const string Tissue = "Tissue";
		}
		#endregion

		#region ContinuingReviewFormName
		public class ContinuingReviewFormName
		{
			public const string InterventionInteraction		= "Continuing Review - Intervention / Interaction";
			public const string ExcessHumanMaterial = "Continuing Review - Excess Human Material";
			public const string SecondaryUse		= "Continuing Review - Secondary Use of Samples/Data";
			public const string MedicalRecords		= "Continuing Review - Health/Medical Information";
			public const string RPDR				= "Continuing Review - Research Data Repository";
			public const string TissueSample		= "Continuing Review - Tissue or Sample Repository";
		}
		#endregion

		#region ContinuingReviewNameOverrideKey
		/// <summary>
		/// Most of these will never be used, but... The Consent Form selection page allows a user to pick the 
		/// appropriate consent form based oin their type of study. BUT, as of 4/23/2007, Dan & Ros haven't completed
		/// the Tissue Sample repository form, so we need to override when the user selects that CR form to redirect them
		/// to the Intervention form. These constants are used in the Web.config to override the default form names built 
		/// into the Constants above.
		/// </summary>
		public class ContinuingReviewNameOverrideKey
		{
			public const string InterventionInteraction		= "Humans.ContinuingReviewFormName.Override.Intervention";
			public const string ExcessHumanMaterial = "Humans.ContinuingReviewFormName.Override.ExcessHumanMaterial";
			public const string SecondaryUse		= "Humans.ContinuingReviewFormName.Override.SecondaryUse";
			public const string MedicalRecords		= "Humans.ContinuingReviewFormName.Override.MedicalRecords";
			public const string RPDR				= "Humans.ContinuingReviewFormName.Override.RPDR";
			public const string TissueSample		= "Humans.ContinuingReviewFormName.Override.TissueSample";
		}
		#endregion

		#region StaffRoleType
		public class StaffRoleType
		{			
			public const int SiteResponsibleInvestigator = 1;	
			public const int CoInvestigator = 2;
			public const int ResearchNurseOrManager = 3;
			public const int ResearchCoordinatorOrManager = 4;
			public const int ResearchAssistant = 5;
			public const int RegulatoryCoordinatorOrManager = 6;
			public const int DataCoordinatorOrManager = 7;	
			public const int Statistician = 8;	
			public const int LaboratoryTechnicianOrTechnologist = 9;	
			public const int InternOrStudent = 10;	
			public const int Other = 11;
			public const int GetsMail = 12;	
			public const int PrincipalInvestigator = 13;			
		}
		#endregion

		#region WorkflowRoleType
		public class WorkflowRoleType
		{
			public const int DepartmentChair = 100;	
			public const int SiteDepartmentChair = 102;
			public const int SiteIRBChair = 103;
			public const int HROIntake = 104;
			public const int Submitter = 105;
            public const int SRACIntakeUser = 106;
            public const int SRACPreViewUsers = 107;
            public const int SRACIntakeTissueUser = 108;
            public const int SRACPreViewAMEStaffY = 109;
            public const int SRACPreViewAMEStaffN = 110;
		}
		#endregion

		#region Ibex License file name
		public class Ibex
		{			
			public const string LicenseFileName = "xmlpdf.lic";		
		}
		#endregion

		#region ProtocolBoardReviewStatusType
		public class ProtocolBoardReviewStatusType
		{
			public const int Approved=		1;
			public const int Deferred=		2;
			public const int DisApproved=	3;
			public const int Hold=			4;
			public const int Noted=			5;
			public const int RefComm=		6;
			public const int ReqMod=		7;
			public const int Terminated=	8;
			public const int withdrawn=		9;
			public const int Pending=		10;
	    }
		#endregion

		#region ProtocolVersion Attributes

		public class ProtocolVersionAttribute
		{
			/// <summary>Indicates whether the attachments tab should be shown or hidden</summary>
			public const string SHOWATTACHMENTSTAB = "SHOW_ATT_TAB";
			/// <summary>Indicates whether the link to edit the title/version should be shown or hidden</summary>
			public const string SHOWTITLELINK = "SHOW_TITLE_LINK";
			/// <summary>Indicates whether the staff & access page tab should be shown or hidden</summary>
			public const string SHOWSTAFFTAB = "SHOW_STAFF_TAB";
			/// <summary>Indicates whether the drugs forms should be listed on the process overview page</summary>
			public const string SHOWDRUGSFORMS = "SHOW_DRUGS_FORMS";
			/// <summary>Indicates whether the devices forms should be listed on the process overview page</summary>
			public const string SHOWDEVICESFORMS = "SHOW_DEVICES_FORMS";
			/// <summary>Indicates whether the children forms should be listed on the process overview page</summary>
			public const string SHOWCHILDRENFORMS = "SHOW_CHILDREN_FORMS";
			/// <summary>Indicates whether the sponsors forms should be listed on the process overview page</summary>
			public const string SHOWSPONSORSFORMS = "SHOW_SPONSORS_FORMS";
		}

		#endregion

        #region View Application Type Allowable Values
        public class ViewApplicationType
        {
        public const string View = "View";
        public const string Simple = "Simple";
        public const string Full = "Full";
        public const string FullUsingProtocolInformation = "FullUsingProtocolInformation";
        }
       #endregion

       #region Module Type values
       public class ModuleType
       {
         public const string Humans = "H";
         public const string Animals = "A";       
       }
       #endregion

        #region WorkFlow Domain type 
        public class WorkFlowDomain
        {
            public const string Humans = "Humans_Workflow";
            public const string Animals = "Animals_WorkFlow";
        }
        #endregion

        #region MainWorkflow values
        public class MainWorkFlow
        {
            public const string Humans = "EIRBWFMain";
            public const string Animals = "EIACUC_MAIN_WF";
        }
        #endregion

        #region WorkflowType values
        public class WorkFlow
        {
            public const string Initial = "INIT";
            public const string InitialTissue = "INITTISSUE";
            public const string Resubmission = "RESUB";
        }
        #endregion

        #region Animal Species domain values
        /// <summary>
        /// Used by the standard and tissue animals forms
        /// </summary>
        public class AnimalSpecies
        {
            public const string Domain = "ANIMSPECIES";
            public const string AttributeOrder = "Order";
        }
        #endregion
      /// <summary>
      /// Types of sponsors
      /// </summary>
      public enum SponsorTypes
      {
         GovernmentFoundation,
         CorporateSponsor,
         InstitutionalAward,
         DepartmentFunds,
         None
      }

      /// <summary>
      /// protocol document attachment validation code
      /// </summary>
      public const string ValidProtocolDocumentAttachment = "ATTVAL_Valid";
      
	}
}
